<%
function htmlencode(fweing)
fweing=cstr(fweing)
if not isnull(fweing) then
	fweing = replace(fweing, ">", "&gt;")
	fweing = replace(fweing, "<", "&lt;")
	fweing = Replace(fweing, CHR(32), "&nbsp;")
	fweing = Replace(fweing, CHR(9), "&nbsp;")
	fweing = Replace(fweing, CHR(34), "&quot;")
	fweing = Replace(fweing, CHR(39), "&#39;")
    fweing = Replace(fweing, CHR(13), "")
    fweing = Replace(fweing, CHR(10), "<p>")
htmlencode = fweing
end if
end function

function HTMLEncode2(fString)
	fString = Replace(fString,  "&lt;","<")
	fString = Replace(fString,  "</P><P>",CHR(10) & CHR(10))
	fString = Replace(fString,  "&gt;",">")
	fString = Replace(fString,  "<br>",CHR(13))
	fString = Replace(fString,  "&quot;",CHR(34))
	fString = Replace(fString,  "&amp;","&")
	fString = Replace(fString,  "&nbsp;",CHR(32))
	HTMLEncode2 = fString
end function

%>


